package com.zt.securityTest.common;
/**
 * time: 2024/11/27 21:21
 * 状态码
 */
public enum ResultCode {

    SUCCESS(20000,"操作成功!"),
    LOGIN_SUCCESS(20001,"登录成功!"),
    LOGOUT_SUCCESS(20002,"退出登录成功!"),



    ERROR(30000,"操作失败!"),
    LOGIN_FAILURE(30001,"登录失败!"),
    LOGOUT_FAILURE(30002,"退出登录失败!"),
    USERNAME_PWD_ERROR(30003,"用户名或密码输入错误!"),
    USERNAME_NULL_ERROR(30004,"用户名为空!"),
    USER_HAS_NO_AUTHORITY(30005,"匿名用户无权限访问!"),
    TOKEN_FAILURE(30006,"token解析失败或token为空"),

    ;


    private Integer code;
    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
